<%@ include file="Include/Config.jsp"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-nested" prefix="nested" %>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

<html>
<head>
<title>WEB RAM PROGRAM SYSTEM</title>
    <link href="ram/style1.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="js/jquery-1.7.1.js"></script>
    <script type="text/javascript">
      $(function(){
      	<logic:messagesPresent message="true">
  	      <html:messages message="true" id="msg">
  	        var msgs = '<bean:write name="msg" />'; 
	            msgs = msgs.replace(/\?/g, '');
	            msgs = msgs.replace(/en_US./g, '');
	            msgs = msgs.replace(/ko_KR./g, '');
              	alert(msgs);
  	      </html:messages>
        </logic:messagesPresent>            
        
          $("img#loginImg").css("cursor", "pointer").click(function(){
              var memId = $("#memId").val();
              var memPw = $("#memPw").val();

              if(memId == "" || memId == undefined){
                  alert("아이디를 입력해주세요.");
                  $("#memId").focus();
                  return false;
              }

              if(memPw == "" || memPw == undefined){
                  alert("비밀번호를 입력해주세요.");
                  $("#memPw").focus();
                  return false;
              }

              var form = $("form")[0];
              form.submit();
          });
      });
    </script> 
    <script type="text/javascript">
    // //2012-02-01 정재우 실장님의 요청으로 enter 입력 로그인 추가 
	   $(document).ready(function(){ 
	     $('body').keypress(function(e){
	    	if(e.keyCode!=13) return;
	    	if(!$('input[name="memPw"]').val()) $('input[name="memPw"]').focus();
	    	var memId = $("#memId").val();
	        var memPw = $("#memPw").val();
	        if(memId == "" || memId == undefined){
	            $("#memId").focus();
	            return false;
	        }
	        if(memPw == "" || memPw == undefined){
	            $("#memPw").focus();
	            return false;
	        }
	        var form = $("form")[0];
	        form.submit();
	     });
	   });
    </script>

</head>
<body topmargin="0" leftmargin="0">
    <form action="login-submit.do" method="post" name="Form" onsubmit="return false">
      <input type="hidden" name="method" value="login" >
	<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" class="tbl_top_bg" ID="Table1">
		<tr>
			<td valign="top">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table2">
					<tr>
						<td><img src="/ram/images/login_01.gif" width="980" height="350"></td>
					</tr>
				</table>
				<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#F7F7F7" ID="Table3">
					<tr>
						<td width="980"><table border="0" cellspacing="0" cellpadding="0" ID="Table4">
								<tr>
									<td><img src="/ram/images/login_02.gif" width="260" height="120"></td>
									<td><table width="190" border="0" align="center" cellpadding="0" cellspacing="0" ID="Table5">
											<tr>
												<td width="53" height="23" align="right" style='padding-right:5px;'><img src="/ram/images/log_id.gif" width="44" height="18"></td>
												<td colspan="2">
													<input name="memId" id="memId" type="text"  class="login_input" style="width:130px;">
												</td>
											</tr>
											<tr>
												<td height="23" align="right" style='padding-right:5px;'><img src="/ram/images/log_pass.gif" width="44" height="18"></td>
												<td colspan="2"><input name="memPw" id="memPw" type="password" class="login_input"  style="width:130px" ></td>
											</tr>
											<tr>
												<td height="22"></td>
												<td width="80">
													<table border="0" cellspacing="0" cellpadding="0" ID="Table6">
														<tr>
															<td><!--input type="checkbox" name="save_id" value="Y" ID="Checkbox1"-->&nbsp;</td>
															<td style='padding-top:3px;'><!--img src="img/log_idsave.gif"-->&nbsp;</td>
														</tr>
													</table>
												</td>
												<td width="57"><img src="/ram/images/bt_login.gif" border="0" id="loginImg" name="loginImg"  alt="로그인"></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table7">
					<tr>
						<td><img src="/ram/images/login_03.gif" width="980" height="80"></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form>
</body>
</html>
